#ifndef __TG028Q_FSMC_H__
#define __TG028Q_FSMC_H__

#include <stdint.h>

#define TG028Q_H 240
#define TG028Q_V 320

// 画笔颜色
#define WHITE 0xFFFF
#define BLACK 0x0000
#define BLUE 0x001F
#define BRED 0XF81F
#define GRED 0XFFE0
#define GBLUE 0X07FF
#define RED 0xF800
#define MAGENTA 0xF81F
#define GREEN 0x07E0
#define CYAN 0x7FFF
#define YELLOW 0xFFE0
#define BROWN 0XBC40 // 棕色
#define BRRED 0XFC07 // 棕红色
#define GRAY 0X8430  // 灰色


//定义写字笔的颜色
#define TG028Q_PENCOLOR    RED

//定义背景颜色
#define TG028Q_BGCOLOR     WHITE



//定义显示方向
//0 竖屏模式
//1 竖屏模式  旋转180
//2 横屏模式
//3 横屏模式  旋转180
#define TG028Q_DISPLAY_DIR 0

#if (0==TG028Q_DISPLAY_DIR || 1==TG028Q_DISPLAY_DIR)
#define	TG028Q_X_MAX	TG028Q_V	//液晶X方宽度
#define TG028Q_Y_MAX	TG028Q_H   	//液晶Y方宽度
     
#elif (2==TG028Q_DISPLAY_DIR || 3==TG028Q_DISPLAY_DIR)
#define	TG028Q_X_MAX	TG028Q_H	//液晶X方宽度
#define TG028Q_Y_MAX	TG028Q_V   	//液晶Y方宽度
     
#else
#error "TG028Q_DISPLAY_DIR 定义错误"
     
#endif


int32_t tg028q_init(void);
void tg028q_clear(uint16_t color);
void tg028q_drawpoint(uint16_t x,uint16_t y,uint16_t color);
void tg028q_fill(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t color);
/*
void tg028q_showchar(uint16_t x,uint16_t y,uint8_t dat);
void tg028q_showstr(uint16_t x,uint16_t y,uint8_t dat[]);
void tg028q_showint8(uint16_t x,uint16_t y,int8_t dat);
void tg028q_showuint8(uint16_t x,uint16_t y,uint8_t dat);
void tg028q_showint16(uint16_t x,uint16_t y,int16_t dat);
void tg028q_showuint16(uint16_t x,uint16_t y,uint16_t dat);
void tg028q_displayimage032(uint8_t *p, uint16_t width, uint16_t height);
void tg028q_displayimage032_zoom(uint8_t *p, uint16_t width, uint16_t height, uint16_t dis_width, uint16_t dis_height);
void tg028q_displayimage7725(uint8_t *p, uint16_t width, uint16_t height);
void tg028q_display_chinese(uint16_t x, uint16_t y, uint8_t size, const uint8_t *p, uint8_t number, uint16_t color);
*/
#endif
